
# this is the module to run for part 1 (graphs)

import datetime
import RandomGraphBuilder

N = 100000
start = datetime.datetime.now()
graphBuilder = RandomGraphBuilder.RandomGraphBuilder(N)
end = datetime.datetime.now()
interval = end - start
print("\nbuilding graph time " + str(interval))
tree = graphBuilder.buildTree()
start = datetime.datetime.now()
tree.DFSearch(N-1)
end = datetime.datetime.now()
interval = end - start
#tree.printGraph()
print("DFS search time " + str(interval))

start = datetime.datetime.now()
tree.BFSearch(N-1)
end = datetime.datetime.now()
interval = end - start
#tree.printGraph()
print("BFS search time " + str(interval))

start = datetime.datetime.now()
tree.IDDFS(N-1,1)
end = datetime.datetime.now()
interval = end - start
print("ID-DFS search time with depth " + str(1)+" " + str(interval))

start = datetime.datetime.now()
tree.IDDFS(N-1,N/2)
end = datetime.datetime.now()
interval = end - start
print("ID-DFS search time with depth " + str(N/2)+" " + str(interval))

start = datetime.datetime.now()
tree.IDDFS(N-1,N)
end = datetime.datetime.now()
interval = end - start
print("ID-DFS search time with depth " + str(N)+" " + str(interval))
